//
// Created by 19y on 2025/9/25.
//

#include "ff_apis.h"
#include "ff.h"
#include "time.h"
#include "system_api.h"
DWORD get_fattime (void)
{
    struct tm stm;
    sys_get_time(&stm);
    return (DWORD)(stm.tm_year - 80) << 25 |
           (DWORD)(stm.tm_mon + 1) << 21 |
           (DWORD)stm.tm_mday << 16 |
           (DWORD)stm.tm_hour << 11 |
           (DWORD)stm.tm_min << 5 |
           (DWORD)stm.tm_sec >> 1;
}